#ifndef ROBOT_H_
#define ROBOT_H_

class Robot;

#include <string>
#include "Etat.h"
#include "Position.h"
#include "Direction.h"
#include "ALarretAVide.h"
#include "RobotObservable.h"
#include "Afficheur.h"

class Robot : public RobotObservable {
	
	
	/*----------- Attributs --------------*/
	
	private:
		Etat* etatCourant;
		Position pos;
		Direction dir;
		
	/*----------- Methodes --------------*/	
	
	public:
		/**
		 * construit un Robot
		 */
		Robot():pos(0,0),dir("sud") 
		{
			etatCourant = Etat::getEtat("ALarretAVide");
		}
		
		void avancer(Position &p);
		void tourner(Direction &direction);
		void saisir();
		void poser();
		void peserObjet();
		void evaluerObstacle();
		void arreter();
		void repartir();
		void changerEtat(std::string nom);
		Etat &getEtat(){return (*etatCourant);}
		Direction &direction() {return dir;} // donne la Direction du robot
		Position &position() {return pos;} // donne la Position du robot
};

#endif /*ROBOT_H_*/
